Conversation
Minor: Also poll sooner on first try
This is done because every call we pay 1 roundtrip, that may be 100ms and this, only to get a pretty bar going through the screen, I feel like 58 tiks are enough out of 8Mb, we don't need 580
Minor: remove old debug stuff wrongly committed
Minor: forgot to bump remote api version
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1983 +/- ##
==========================================
+ Coverage 50.60% 50.80% +0.19%
==========================================
Files 384 384
Lines 41180 41277 +97
Branches 7642 7664 +22
==========================================
+ Hits 20841 20969 +128
+ Misses 19589 19552 -37
- Partials 750 756 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Minor: remove unused API Minor: json api should call non-json API
pieqq
left a comment
There was a problem hiding this comment.
First feedback, will test it locally later.
|
I found a script that allows to slow down a connection, so I used it inside an LXC container to simulate a slow connection (I originally tried with Then I ran Checkbox in agent mode in the container ( With the current version of Checkbox in I then used the following launcher to simulate a full test run: I then timed the run with both With With this PR's branch: This will surely be helpful on slow connections! Once the changes in my reviews (above) land, we're good to land this! |
Turns out, 13 + 1 = 14, not 15
* Initial jsonification * More json apis Minor: Also poll sooner on first try * Increase chunk size greately This is done because every call we pay 1 roundtrip, that may be 100ms and this, only to get a pretty bar going through the screen, I feel like 58 tiks are enough out of 8Mb, we don't need 580 * Document RemoteAssistant better with a docstr Minor: remove old debug stuff wrongly committed * Off by 1 error on the polling delay * Cache attributes of job interactions Minor: forgot to bump remote api version * Adjust tests to the new api version * Test all new json apis * Fix bug in finish_job_json on None result Minor: remove unused API Minor: json api should call non-json API * Wrong function called * Test modified controller functions * Document why we use the api to fetch the Configuration type * Correct double bump done by mistake Turns out, 13 + 1 = 14, not 15
* Initial jsonification * More json apis Minor: Also poll sooner on first try * Increase chunk size greately This is done because every call we pay 1 roundtrip, that may be 100ms and this, only to get a pretty bar going through the screen, I feel like 58 tiks are enough out of 8Mb, we don't need 580 * Document RemoteAssistant better with a docstr Minor: remove old debug stuff wrongly committed * Off by 1 error on the polling delay * Cache attributes of job interactions Minor: forgot to bump remote api version * Adjust tests to the new api version * Test all new json apis * Fix bug in finish_job_json on None result Minor: remove unused API Minor: json api should call non-json API * Wrong function called * Test modified controller functions * Document why we use the api to fetch the Configuration type * Correct double bump done by mistake Turns out, 13 + 1 = 14, not 15
* Initial jsonification * More json apis Minor: Also poll sooner on first try * Increase chunk size greately This is done because every call we pay 1 roundtrip, that may be 100ms and this, only to get a pretty bar going through the screen, I feel like 58 tiks are enough out of 8Mb, we don't need 580 * Document RemoteAssistant better with a docstr Minor: remove old debug stuff wrongly committed * Off by 1 error on the polling delay * Cache attributes of job interactions Minor: forgot to bump remote api version * Adjust tests to the new api version * Test all new json apis * Fix bug in finish_job_json on None result Minor: remove unused API Minor: json api should call non-json API * Wrong function called * Test modified controller functions * Document why we use the api to fetch the Configuration type * Correct double bump done by mistake Turns out, 13 + 1 = 14, not 15
* Initial jsonification * More json apis Minor: Also poll sooner on first try * Increase chunk size greately This is done because every call we pay 1 roundtrip, that may be 100ms and this, only to get a pretty bar going through the screen, I feel like 58 tiks are enough out of 8Mb, we don't need 580 * Document RemoteAssistant better with a docstr Minor: remove old debug stuff wrongly committed * Off by 1 error on the polling delay * Cache attributes of job interactions Minor: forgot to bump remote api version * Adjust tests to the new api version * Test all new json apis * Fix bug in finish_job_json on None result Minor: remove unused API Minor: json api should call non-json API * Wrong function called * Test modified controller functions * Document why we use the api to fetch the Configuration type * Correct double bump done by mistake Turns out, 13 + 1 = 14, not 15
Description
Checkbox Remote is very, very slow when used over a slow connection. This is mostly due to a reason: When returning a mutable objects over an rpyc function, any further query on that object is a rpyc call. This is most evident in the following situations:
Additionally (this is a bit of a bonus), every test on a medium to high latency will always pay 0.5s to "wait" for the test to be completed + the latency. This adds a backoff mechanism that starts from 0 and goes to .5s
Resolved issues
Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1956
Fixes: https://warthogs.atlassian.net/browse/CHECKBOX-1955
Documentation
Documented this in the class docstring
Tests
Added unit tests for /most/ of the api changed.
To try this change and simulate this issue locally modify
checkbox-ng/plainbox/vendor/rpyc/core/protocol.pyadd to the serve function of the Connection class the followingThis will simulate a 100ms latency (less than what it is Europe to Taiwan). Add the following test units to the metabox provider:
A test run at 100ms latency of this testplan takes about 35minutes on main, 5m on this branch
Additionally, I've used this very ugly decorator to log all the calls made to the server to be able to track them down
Decorate all handle[...] functions in the Connection class to use this.